import React from 'react';
import {connect} from 'react-redux';
import {setStep} from './index'

class Input extends React.Component{
    render(){
        return <input type="text" onChange={this.props.handleChange.bind(this)} value={this.props.step}></input>
    }
}
export default connect(function (state) {
        console.log(state);
        return state;
    },
    function (dispatch) {
        return {
            handleChange(event){
                dispatch(setStep(event.target.value))
                return true
            }
        }
})(Input);